package com.ruoyi.project.gxgw_modules.chargeLog.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.gxgw_modules.chargeLog.mapper.ChargeLogMapper;
import com.ruoyi.project.gxgw_modules.chargeLog.domain.ChargeLog;
import com.ruoyi.project.gxgw_modules.chargeLog.domain.ReasultByMouth;
import com.ruoyi.project.gxgw_modules.chargeLog.domain.ReasultByYear;
import com.ruoyi.project.gxgw_modules.chargeLog.domain.SumByQuarter;
import com.ruoyi.project.gxgw_modules.chargeLog.service.IChargeLogService;
import com.ruoyi.common.support.Convert;

/**
 * 支付记录 服务层实现
 * 
 * @author ruoyi
 * @date 2019-01-19
 */
@Service
public class ChargeLogServiceImpl implements IChargeLogService 
{
	@Autowired
	private ChargeLogMapper chargeLogMapper;

	/**
     * 查询支付记录信息
     * 
     * @param chargeLogId 支付记录ID
     * @return 支付记录信息
     */
    @Override
	public ChargeLog selectChargeLogById(Integer chargeLogId)
	{
	    return chargeLogMapper.selectChargeLogById(chargeLogId);
	}
	
	/**
     * 查询支付记录列表
     * 
     * @param chargeLog 支付记录信息
     * @return 支付记录集合
     */
	@Override
	public List<ChargeLog> selectChargeLogList(ChargeLog chargeLog)
	{
	    return chargeLogMapper.selectChargeLogList(chargeLog);
	}
	
    /**
     * 新增支付记录
     * 
     * @param chargeLog 支付记录信息
     * @return 结果
     */
	@Override
	public int insertChargeLog(ChargeLog chargeLog)
	{
	    return chargeLogMapper.insertChargeLog(chargeLog);
	}
	
	/**
     * 修改支付记录
     * 
     * @param chargeLog 支付记录信息
     * @return 结果
     */
	@Override
	public int updateChargeLog(ChargeLog chargeLog)
	{
	    return chargeLogMapper.updateChargeLog(chargeLog);
	}

	/**
     * 删除支付记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteChargeLogByIds(String ids)
	{
		return chargeLogMapper.deleteChargeLogByIds(Convert.toStrArray(ids));
	}

	@Override
	public List<ReasultByMouth> selectNumByMouth(String year, String mouth) {
		// TODO Auto-generated method stub
		return chargeLogMapper.selectNumByMouth(year, mouth);
	}

	@Override
	public List<ReasultByYear> selectNumByYear(String year) {
		// TODO Auto-generated method stub
		return chargeLogMapper.selectNumByYear(year);
	}
	
	

	@Override
	public List<SumByQuarter> sumByQuart(String year) {
		// TODO Auto-generated method stub
		return chargeLogMapper.sumByQuart(year);
	}
	
}
